﻿@model ScrumProject.Models.Story

@{
    ViewBag.Title = "Details";
}

<h2>Details</h2>

@using (Html.BeginForm())
{
    @Html.ValidationSummary(true)
<table class="table">
    <thead></thead>
    <tbody>
        <tr>
            <td>
                Name
            </td>
            <td>
                @Html.TextBoxFor(model => model.Name, new { disabled = "disabled", @readonly = "readonly" })
            </td>
        </tr>
          <tr>
            <td>
                Description
            </td>
            <td>
                @Html.TextBoxFor(model => model.Description, new { disabled = "disabled", @readonly = "readonly" })
            </td>
         </tr>
         <tr>
            <td>
                Tests
            </td>
            <td>
                @Html.TextBoxFor(model => model.Tests, new { disabled = "disabled", @readonly = "readonly" })
            </td>
        </tr>
        <tr>
            <td>
                Priority
            </td>
            <td>
                @Html.TextBoxFor(model => model.Priority, new { disabled = "disabled", @readonly = "readonly" })
            </td>
        </tr>
          <tr>
            <td>
                Business Value
            </td>
            <td>
                @Html.TextBoxFor(model => model.BusinessValue, new { disabled = "disabled", @readonly = "readonly" })
            </td>
         </tr>
        @* <tr>
            <td>
                Status
            </td>
            <td>
                @Html.TextBoxFor(model => model.Status, new { disabled = "disabled", @readonly = "readonly" })
            </td>
        </tr>*@
        <tr>
            <td>
                Notes
            </td>
            <td>
                @Html.TextBoxFor(model => model.Notes, new { disabled = "disabled", @readonly = "readonly" })
            </td>
        </tr>
       @*   <tr>
            <td>
                Points 
            </td>
            <td>
                @Html.TextBoxFor(model => model.Points, new { disabled = "disabled", @readonly = "readonly" })
            </td>
         </tr>
         <tr>
            <td>
                Project
            </td>
            <td>
                @Html.TextBoxFor(model => model.Project.Name, new { disabled = "disabled", @readonly = "readonly" })
            </td>
        </tr>*@

        <tr>
            <td></td>
            <td></td>
        </tr>

        <tr>
            <td>
                <h4>Tasks: </h4>
            </td>
            <td></td>
        </tr>

        @if (Model.Tasks != null)
        {
            foreach (var item in Model.Tasks)
            {
                <tr>
                    <td></td>
                    <td><strong>Description: </strong> @item.Description 
                        <strong>Work Remaining:  </strong> @item.WorkRemaining
                    </td>
                </tr>
            }
        }
        <tr>
            <td></td>
            <td>
                @if (ViewBag.isHideButtonA)
                {
                    <input type="submit" name="submitButton" value="Accept" class="btn" />
                }
                @if (ViewBag.isHideButtonR)
                {
                    <input type="submit" name="submitButton" value="Reject" class="btn" />                
                }
            </td>
        </tr>
        <tr>
            <td>
            </td>
            <td>
                  @Html.ActionLink("Edit", "Edit", new { id = Model.Id }) | 
                  @Html.ActionLink("Back to List", "Index", new { projectId = ViewBag.projectId }, null)
            </td>
            <td>
            </td>
        </tr>
    </tbody>
    </table>
}
